Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stdlib] Simplify UnsafePointer function signatures #3721

Open
wants to merge 6 commits into
base: nightly
Choose a base branch
from

Conversation

martinvuyk
Copy link
Contributor

Simplify UnsafePointer function signatures.

Remove all usage of alignment and address_space from function signatures since bitcast already has those options:

    fn bitcast[
        T: AnyType = Self.type,
        /,
        address_space: AddressSpace = Self.address_space,
        alignment: Int = Self.alignment,
        origin: Origin[True].type = Self.origin,
    ](self) -> UnsafePointer[T, address_space, alignment, origin]:
    ...

This might break a lot of Modular internal code. Since we don't have a deprecation warning that can be tuned to specific args or parameters, I went for just deleting the parameters. We could also duplicate the function signatures and add @deprecated to those with alignment and/or address_space options.

@martinvuyk martinvuyk marked this pull request as ready for review October 29, 2024 15:21
@martinvuyk martinvuyk requested a review from a team as a code owner October 29, 2024 15:21
@JoeLoser JoeLoser requested review from abduld and ConnorGray November 5, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant